package com.hnzq.cloud.freshuserassembly.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.hnzq.cloud.dto.PageUsersDto;
import com.hnzq.cloud.dto.RegisterDto;
import com.hnzq.cloud.dto.UserDto;
import com.hnzq.cloud.freshuserassembly.domain.FreUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hnzq.cloud.param.*;


/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 周皓月
 * @since 2022-02-03
 */
public interface IFreUserService extends IService<FreUser> {

    //TODO 用户注册或者后台新增用户
    RegisterDto register(RegisterParam registerParam);

    //TODO 后台分页条件查询用户列表
    PageUsersDto findUsersByCondition(FindUsersParam findUsersParam);

    //TODO 后台更新用户
    UserDto updateUserById(UpdateUserParam updateUserParam) throws JsonProcessingException;

    //TODO 后台删除用户
    Boolean deleteUserById(DeleteUserParam deleteUserParam) throws JsonProcessingException;

    //TODO 后台增加用户积分
    Boolean addUserScore(AddUserScoreParam addUserScoreParam) throws JsonProcessingException;

    //TODO 后台计算用户等级
    Boolean caculateUserLevel(UserLevelParam userLevelParam) throws JsonProcessingException;

    // TODO 用户登录
    String login(String accountName,String accountPassword);

    // TODO 用户登出操作
    void loginOut();
}
